<?php

namespace Home\Controller;
use Common\Controller\Base;
use Common\Model\Model;
use Think\Controller;

class ToutiaoController extends Base {

    //动态首页
    public function index(){

        //中间广告位
        $this->assign('midad',parent::getAdvert(3,1,0,1));

        //类别每日一荐
        $this->assign('catetj',D('Home/Works')->cateonework());

        //右上角广告
        $this->assign('righttopad',parent::getAdvert(3,3,0,1));

        //焙友动态
        $this->userDynamicData=D('Home/User')->userDynamic(5);

        //热门活动
        $this->assign('activitytj',D('Home/Activity')->activitytj(2));

        //右边广告
        $this->assign('rightmidad',parent::getAdvert(3,3,1,4));

        //分享达人
        $this->assign('sharedaren',D('Home/User')->sharedaren(5,$this->userid));

        $this->display();

    }
}